package com.guigu.tms.manager.controller;

import com.github.pagehelper.PageInfo;
import com.guigu.tms.commons.aggregation.entity.Order;
import com.guigu.tms.commons.order.feign.OrderFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("order")
public class OrderController {
    @Autowired
    private OrderFeignClient orderFeignClient;

    @Autowired
    private com.guigu.tms.commons.aggregation.feign.OrderFeignClient orderFeignClient1;

    @PostMapping("getOrders/{num}/{size}")
    public PageInfo<Order> getOrders(@RequestBody com.guigu.tms.commons.aggregation.entity.Order order, @PathVariable("num") Integer num, @PathVariable("size") Integer size){
        return orderFeignClient1.getOrders(order, num, size);
    }

}
